package com.freeter.modules.gjs.service.impl;

import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.freeter.modules.gjs.entity.StockStatus;
import com.freeter.modules.gjs.mapper.StockStatusMapper;
import com.freeter.modules.gjs.service.StockStatusService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;

@Service
public class StockStatusServiceImpl extends ServiceImpl<StockStatusMapper, StockStatus> implements StockStatusService {
    @Autowired private StockStatusMapper stockStatusMapper;


    @Override
    public List<StockStatus> getLowStockStatus() {
        return stockStatusMapper.selectLowStock();
    }

    @Override
    public List<java.util.Map<String, Object>> itemList(String projectCode, String siteId, String catId) {
        return stockStatusMapper.selectItemList(projectCode, siteId, catId);
    }

    @Override
    public List<java.util.Map<String, Object>> allItemList() {
        return stockStatusMapper.selectAllItemList();
    }

    @Override
    public List<java.util.Map<String, Object>> allUpdatedItemList(String projectCode, String siteId, String currentLastUpdate) {
        return stockStatusMapper.selectAllUpdatedItemList(projectCode, siteId, currentLastUpdate);
    }

    @Override
    public Map<String, Object> item(String projectCode, String siteId, String id, String itemBarcode) {
        return stockStatusMapper.selectItemByIdOrBarcode(projectCode, siteId, id, itemBarcode);
    }
} 